//
//  SocketInfo.m
//  IPTV
//
//  Created by liao Echo on 14-5-17.
//  Copyright (c) 2014年 Echo. All rights reserved.
//

#import "SocketInfo.h"

@implementation SocketInfo
@synthesize type;
@synthesize time;
@synthesize monday_able, tuesday_able, wednesday_able, thursday_able, friday_able, saturday_able, sunday_able, onState;

- (void)encodeWithCoder:(NSCoder *)encoder {
    [encoder encodeInt:type forKey:@"type"];
    
    [encoder encodeInt:monday_able forKey:@"monday_able"];
    [encoder encodeInt:tuesday_able forKey:@"tuesday_able"];
    [encoder encodeInt:wednesday_able forKey:@"wednesday_able"];
    [encoder encodeInt:thursday_able forKey:@"thursday_able"];
    [encoder encodeInt:friday_able forKey:@"friday_able"];
    [encoder encodeInt:saturday_able forKey:@"saturday_able"];
    [encoder encodeInt:sunday_able forKey:@"sunday_able"];
    [encoder encodeInt:onState forKey:@"onState"];
    
    [encoder encodeObject:time forKey:@"time"];
    
}

- (id)initWithCoder:(NSCoder *)decoder{
	self=[super init];
    self.type = [decoder decodeIntForKey:@"type"];
    
    self.monday_able = [decoder decodeIntForKey:@"monday_able"];
    self.tuesday_able = [decoder decodeIntForKey:@"tuesday_able"];
    self.wednesday_able = [decoder decodeIntForKey:@"wednesday_able"];
    self.thursday_able = [decoder decodeIntForKey:@"thursday_able"];
    self.friday_able = [decoder decodeIntForKey:@"friday_able"];
    self.saturday_able = [decoder decodeIntForKey:@"saturday_able"];
    self.sunday_able = [decoder decodeIntForKey:@"sunday_able"];
    self.onState = [decoder decodeIntForKey:@"onState"];
    
    self.time = [decoder decodeObjectForKey:@"time"];
    
	return self;
}
@end
